<script type='text/javascript'>
 	var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
<?
$count = 0;
foreach ( $relatedvideos as $item ) {
	?>
messages[<?=$count?>] = new Array('<?=base_url ()?>assets/videos/image_preview/image<?=$item->id?>_thumb.jpg','<center>Views:<?=$item->no_of_views?>  time:<?=$item->time?></center>',"#FFFFFF");
	<?
	$count ++;
}
?></script>
<script type="text/javascript"
	src="<?=base_url ();?>assets/imagemouseover.js"></script>




<style type="text/css">
td.cell1 {
	border: 1px solid black;
}

ul {
	list-style-image: url("<?=base_url ();?>/assets/videoimgs/buttion-2.gif")
}

#font_style {
	font-size: 12px;
	font-weight: bold;
}
</style>
<table cellpadding="0" cellspacing="0">

	<tr>
		<td id='content-header-left' align="center">Categories</td>
		<td id='content-header-center' align="center">
			Now playing <?=ucfirst ( trim_name ( $videoname, 30 ) )?></td>
		<td id="content-header-right" ></td>
	</tr>

	<tr>
		<td id="gossip_left_right" bgcolor="#E3E1E2" valign="top">
		<table>
		   <?
					foreach ( $videocategeories->result () as $item ) {
						?>
		   
		     <tr>
				<td><img src="<?=base_url ();?>assets/imgs/button-img.gif" /></td>

				<td class="sidelinks"><a
					href="<?=base_url ();?>videos/displayvideos/<?=$item->id?>"><?=ucfirst ( trim_name ( $item->name, 18 ) )?></a></td>
			</tr>
			<?
					}
					?>
		     
		    </table>

		</td>
		<td bgcolor="#FDFAE3">
		<table cellpading="0" cellspaceing="0">
			<tr>
				<td valign="top">
				<table>
					<tr>
						<td bgcolor="#FF6407" class="cell1" valign="top"><font size="2"
							color="#FDFAE3">
						<center><b>Related Videos</b></center>
						</font></td>

					</tr>
					<tr>
						<td width='215px'><font id='font_style'>
						<ul type="square">
 							<?
								if (! empty ( $relatedvideos )) {
									
									$count = 0;
									foreach ( $relatedvideos as $item ) {
										?>    
 							
 							<a
								href="<?=base_url ();?>video/playvideo/<?=$item->id?>/<?=$item->video_cat_id?>"
								onmouseover="doTooltipimage(event,<?=$count?>,<?=$item->id?>,'<?=base_url ()?>')"
								onmouseout="hideTip()" style="color: BLACK">
							<li><?=ucfirst ( trim_name ( $item->name, 18 ) )?><span
								style="font-size: 11px; font-weight: normal; color: green"> <?=$item->no_of_views?>  views</span></li>
							</a> 
 							<?
										$count ++;
									}
								}
								?> 
                            

 							 							
						</ul>
						</font></td>
					</tr>
				</table>
				</td>

				<td valign="top"> &nbsp;
 		       <?=$videoplayer?>
 		    	</td>


			</tr>

			<tr>
				<td bgcolor="#FF6407" colspan="2" height="5" align="center"><font
					size="2" color="#FDFAE3"><b>Top Viwed Videos</b> </font></td>
			</tr>
			<tr>
				<td colspan="2">
				<table cellpadding="0" cellspacing="10" align="center">
					<tr>
			  <?
					$i = 1;
					foreach ( $topviewedvideos->result () as $item ) {
						?>
				<td width='200px'>
						<div align="center" id="text" style="padding: 2px;"><?=ucfirst ( trim_name ( $item->name, 15 ) )?><br>
						<div style="padding: 0px 25px 0px 25px; height: 139px;">
						<div style="height: 104px; margin-top: 5px;">
						<div id="video_time"><? echo $item->time;?></div><a
							href="<?=base_url ();?>video/playvideo/<?=$item->id?>/<?=$item->video_cat_id?>"><img
							src="<?=base_url ();?>assets/videos/image_preview/image<?=$item->id?>_thumb.jpg"
							border='0' style="padding-top: 5px" /></a></div>
						 
						<br>views:<?=$item->no_of_views?></div>
						</div>
						</td>
			       
			      
			       <?
						if ($i % 3 == 0) {
							echo "</tr><tr>";
						}
						$i ++;
					}
					?>
				</tr>

				</table>
				</td>
			</tr>

		</table>
		</td>
		<td bgcolor="#E3E1E2"></td>

	</tr>
</table>


